print("Please think of a number between 0 and 100!")
start = 0
end = 100
mid = (end + start) / 2
while True:
    print("Is your secret number " + str(mid) + "?")
    print("Enter 'h' to indicate the guess is too high. Enter 'l' to indicate the guess is too low. Enter 'c' to indicate I guessed correctly. " +raw_input())
    if raw_input() == 'l':
        start = mid
        mid = (end + start) / 2
        print("Is your secret number " + str(mid) + "?")
    elif raw_input() == 'h':
        end = mid
        mid = (end + start) / 2
        print("Is your secret number " + str(mid) + "?")
    elif raw_input() == 'c':
        print("Game over. Your secret number was: " + str(mid))
        break;
    else:
        print("Sorry, I did not understand your input.")
